<!DOCTYPE html>

<html lang="it">

    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />

        <title><?= ($_GET[ACTION] == ACTION_ARTICLE) ? $article->title : 'Archivio' ?> :: Eventi Jesolo 2013 - Movimento Giovanile Salesiano</title>

        <link rel="stylesheet" href="<?= Site::APP_URL ?>bootstrap/css/bootstrap.min.css" />
        <link rel="stylesheet" href="<?= Site::APP_URL ?>css/base.css" />
        <style>
            #social_share {
                background-color: #FFF;
                padding: 15px 15px 10px 15px;
                margin: 0px -20px 20px -20px;   
            }

            #social_share h2 {
                color: #000;
            }

            #social_share  li{
                display: inline-block;
            }
            #social_share  li:first-child{
                margin-right: 20px;
                margin-left: 20px;
            }
        </style>
        <!-- <link rel="stylesheet" href="../js/swiper/idangerous.swiper.css" /> -->
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
        <script type="text/javascript" src="<?= Site::APP_URL ?>js/jwerty/jwerty.js"></script>
        <script src="http://crypto-js.googlecode.com/svn/tags/3.0.2/build/rollups/md5.js"></script>
        <script src="<?= Site::APP_URL ?>js/jwerty-setup.js"></script>
        <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
        <?php
            if (!$logged) {
            ?>
                <script type="text/javascript">

                    var _gaq = _gaq || [];
                    _gaq.push(['_setAccount', 'UA-37956304-1']);
                    _gaq.push(['_trackPageview']);

                    (function() {
                        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
                    })();

                </script>
                <script type="text/javascript">

                var _gaq = _gaq || [];
                _gaq.push(['_setAccount', 'UA-1473871-1']);
                _gaq.push(['_trackPageview']);

                (function() {
                  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
                })();

              </script>
        <?php
            }
        ?>
       <!--[if lt IE 9]>
                <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
                <script src="http://css3-mediaqueries-js.googlecode.com/files/css3-mediaqueries.js"></script>
        <![endif]-->
    </head>

    <body>
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s); js.id = id;
            js.src = "//connect.facebook.net/it_IT/all.js#xfbml=1&appId=410598095689639";
            fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));</script>
        <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
        <!-- Page Layout HTML here -->
        <?= $navigation->to_html(false) ?>
        <?= $header->to_html(false) ?>
        <div class="container">
            <div class="row">
                <div class="span12">
                    <h1>Tutte le News</h1>
                    <?php if ($logged) { ?>
                            <a href="<?= Site::APP_URL ?>admin/news.php?action=new" class="btn btn-info btn-large"><i class="icon-white icon-file"></i> Nuova News</a>
                            <?php
                        }
                        ?>
                    <div class="wrapper">
                        <?php
                        if (count($news) > 0) {
                            foreach ($news as $n) {
                                $n->to_html($logged);
                            }
                        } else {
                            echo '<p>Non ci sono ancora News! Ritorna più avanti!</p>';
                        }
                        ?>
                    </div> 
                </div>
            </div>
        </div>
        <?= $footer->to_html(false) ?>

        <!-- Initialize JS Plugins -->
        <script src="<?= Site::APP_URL ?>bootstrap/js/bootstrap.min.js"></script>
        <script src="<?= Site::APP_URL ?>js/retina.js"></script>
    </body>
</html>